Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar Namespace / PipeStream Class / Write Method / Write(Byte[],Int32,Int32) Method
An array of bytes. This method copies count bytes from buffer to the current stream.The buffer to write data from.
The zero-based byte offset in buffer at which to begin copying bytes to the current stream.The byte offset in buffer at which to begin writing from.
The number of bytes to be written to the current stream.The maximum number of bytes to write.

Write(Byte[],Int32,Int32) Method
When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. Writes a block of bytes to the current stream using data read from buffer.
Syntax
'Declaration
 
Public Overloads Overrides Sub Write( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) 
 

Parameters

buffer
An array of bytes. This method copies count bytes from buffer to the current stream.The buffer to write data from.
offset
The zero-based byte offset in buffer at which to begin copying bytes to the current stream.The byte offset in buffer at which to begin writing from.
count
The number of bytes to be written to the current stream.The maximum number of bytes to write.
Exceptions
ExceptionDescription
The sum of offset and count is greater than the buffer length.
buffer is a null reference (Nothing in Visual Basic).
offset or count is negative.
An I/O error occured, such as the specified file cannot be found.
The stream does not support writing.
System.IO.Stream.Write(System.Byte[],System.Int32,System.Int32) was called after the stream was closed.
buffer is null.
The stream does not support writing. For additional information see System.IO.Stream.CanWrite. -or- The current position is closer than count bytes to the end of the stream, and the capacity cannot be modified.
offset subtracted from the buffer length is less than count.
offset or count are negative.
An I/O error occurs.
The current stream instance is closed.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also